import service from './service';

/**
 * 调用服务
 * @param spaceid 系统参数spaceid
 * @param service_name 服务名
 * @param condition 内容
 */
export default async function nodejs(spaceid: string, service_name: string, condition = {}) {
	const params = {
		condition,
		modelid: 'custom::js_' + service_name,
		spaceid
	};
	const data = await service(spaceid, 'dataservice.nodejs', params);
	return JSON.parse(data);
}
